package demo1224.am;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

public class Demo_03 {
    public static void main(String[] args) {
        try {
            FileReader f1=new FileReader("src\\demo1224\\am\\Demo_03.java");
            FileWriter f2=new FileWriter("大聪明.txt");
            int read;
            while ((read=f1.read())!=-1){
                f2.write(read);
            }
            f2.flush();
            f1.close();
            f2.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
